Method and device for realizing content flowing on P2P network

ABSTRACT

This invention relates to a method and device for realizing content flowing continuously on P2P network, which is used for dividing the content to be transmitted into a plurality of blocks; detects connection state of all nodes performing the content transmission, calculates an upload rate coefficient of each node, determines the selected upload rate coefficient according to the upload rate coefficient, and determines a transmission rate of the content stream and the number of the content stream transmitted by a content source, the content source distributes the content blocks being able to be transmitted by each node proportionally according to the selected upload rate coefficient of each node; and transmits the distributed content blocks to the corresponding nodes respectively, and controls the node to re-transmit the received content block to other nodes. The present invention can utilize the resource more reasonably and fully.

CROSS REFERENCE TO RELATED PATENT APPLICATION

The present application is the US national stage of PCT/CN2006/000770filed on Apr. 21, 2006, which claims the priority of thePCT/CN2006/000770 filed on Apr. 21, 2006, which application isincorporated herein by reference.

TECHNICAL FILED

This invention relates to computer network, in particular to a methodand device for realizing content flowing continuously on P2P network.

BACKGROUND OF THE INVENTION

In the earlier P2P transmission, Application Layer Multi-cast (ALM)distribution tree technology is adopted, in which, medial nodesredistribute content and leaf nodes receive the content. This method istroubled with two problems. The loads undertaken by the medial nodes arevery heavy, while the upload bandwidth of the leaf nodes is not utilizedto distribute the contents.

One improved method is that the source nodes divide the content into aplurality of blocks, and then respectively transmit them to each node.Each node then retransmits them to other nodes. The improvement of thismethod is that each node (possibly all the nodes) are used for upload,but the difference of the upload bandwidth between each node is not yetused.

A further improved method is that it also divides the content into aplurality of blocks. The number of the blocks redistributed by a certainnode is proportional to the upload bandwidth of the node. The node withlarger upload bandwidth can redistribute many blocks, while the nodewith smaller upload bandwidth can redistribute less blocks. This methodmakes full use of the upload bandwidth of each node. But furtherimprovement is also required, because this method is unfair. It mayincrease the unnecessary load for certain nodes. For example, if acontent download requires bandwidth B, herein three nodes can undertakethe task, and then totally 3B of upload bandwidth is required to providetransmission for them. Yet their base upload bandwidths are respectivelyB, 0B and 5B. Therefore, they respectively contributed 0.5B, 0B and 2.5Bupload bandwidth. Obviously, there is no necessity for the nodecontributed 2.5B to provide another more 0.5B upload bandwidth for anode with the capability. Generally, it is recommended to help the nodewith difficulty, but not the nodes with the capability in a way ofrobbing the rich.

On the other hand, download of a group of users in P2P transmissionrequires the support of corresponding upload. In a certain period,download summation equals to the upload summation. Total uploadbandwidth should be larger than the total bandwidth required fordownload. When the total bandwidth of upload is not satisfied, therewill be no way to download. Therefore, the method for controllingtransmission rate and traffic is required.

SUMMARY OF THE INVENTION

This invention mainly aims to solve the existing technical problems, andprovides a method and device for realizing content flowing continuouslyon P2P network to achieve a more reasonable and full use of the sourceof each node.

For achieving the objectives mentioned above, this invention discloses amethod for realizing content flowing continuously on P2P networkconsisting of the steps: A1.Dividing the content to be transmitted intodifferent blocks;

B1.Detecting connection state of all nodes transmitting the content,including a maximum upload rate permitted for content transmission ofeach node, wherein calculating the upload rate coefficient MU_(j) ofeach node, in which the said upload rate coefficient MU_(j) equals tothe maximum upload rate permitted for content transmission divided bythe base rate U_(bass); determining the selected upload rate coefficientU_(j) of each node, based on the upload rate coefficient MU_(j), inwhich j=1,2, . . . N, N indicates the number of nodes transmitting thecontent and determining transmission rate D of the content stream andthe number L of the content stream transmitted from the content source,herein, the said transmission rate D of the content stream andtransmitted content stream number L of the content source can bevariable or fixed depending on different conditions, the said selectedupload rate coefficient U_(j) simultaneously satisfies the following twoformulas:(U ₁ + . . . +U _(N))*U _(bass) +L*D≧f(N*D)U_(j)≦MU_(j)

wherein, f (N*D) means the function of N*D, which is the bandwidthrequired for total download; and

D≦maximum rate of content stream transmission used by the content sourcewhen transmitting one content stream;

L*D≦sum of maximum upload bandwidth for the content transmissionprovided by all the nodes of the content source

C1. The content source distributes the content blocks being able to betransmitted by each node proportionally according to the selected uploadrate coefficient of each node;

D1. The content source respectively transmits the distributed contentblocks to the corresponding nodes at the L*D rate, and controls thenodes to retransmit the content blocks received to the other nodes.

In step C1 and D1, the nodes transmit the content blocks according tothe selected upload rate coefficient.

In step B1, the selected upload rate coefficient U_(j) of each node isdetermined based on the following conditions: select U_(j)=MU_(j) whenMU_(j)*U_(bass)≦D; when MU_(j)*U_(bass)>D, the selected U_(j) shouldsatisfy U_(j)*U_(bass)≧D.

When (MU₁+ . . . +MU_(N))* U_(bass)+L*D≧f (N*D) and with the originaltransmission rate and the network upload bandwidth of the contentsource, the said step D1 includes the following steps:

D11. Controlling the nodes which selected upload rate coefficient islarger than or equal to 1 and with the capability of uploading thecontent blocks to distribute one block;

D12. Calculating the residual selected upload rate coefficient of eachnode: the said residual selected upload rate coefficient equals to thedistributed content block number of this node subtracted from theselected upload rate coefficient;

D13. If there are residual content blocks to be uploaded, performingstep D14;

D14. Controlling the nodes which residual selected upload ratecoefficient is larger than or equal to 1 and with the residual uploadcapability block to distribute one block;

D15. Repeating to perform step D12-D14 until all the content blocks aredistributed.

In the steps mentioned above, when (MU₁+ . . . +MU_(N))* U_(bass)+L*D≧f(N*D) and with the original transmission rate and the network uploadbandwidth of the content source, the said step D1 includes the followingsteps:

D11′. Calculating the bandwidth coefficient SU_(j) which is satisfiedthe requirement for its downloading as possible: SU_(j)=MU_(j) whenMU_(j)*U_(bass)≦D, SU_(j)=D/U_(bass) when MU_(j)*U_(bass)>D;

D12′. Calculating U_(j)′ according to the formulaU_(j)′=(MU_(j)−SU_(j))/sum of residual upload rate coefficient for allthe members * the number of residual blocks to be uploaded;

D13′. Calculating U_(j)′ according to the formula U_(j)′=U_(j)′+SU_(j);

D14′. Member j (j=1, 2, . . . , N) distributes the content blocks withU_(j).

For real-time knowing the connection state of each node and regulatingthe transmission parameter in time, in step B1, regularly detecting theconnection state of each node, and calculating the selected upload ratecoefficient U_(j), transmission rate D of the content stream and thenumber L of the transmitted content stream from the content source.

For server's timely learning of problem during transmission andaccordingly changing the transmission parameter, B1 consists of thefollowing steps: by using Quality of Service, when problem is detectedduring transmission, detecting the connection state of each node, andcalculating the selected upload rate coefficient U_(j), transmissionrate D of the content stream and the number L of the transmitted contentstream from the content source.

The transmission rate D of the content stream and the number L of thecontent stream transmitted from the content source can be variable orfixed depending on different conditions, the calculating of the saidtransmission rate D of the content stream and the number L of thecontent stream transmitted from the content source includes thefollowing steps:

A2. Calculating the range of the said transmission rate D of the contentstream and the number L of content stream transmitted from the contentsource by using the condition that “D≦maximum rate of content streamtransmission used by the content source when transmitting one contentstream” and “L*D≦maximum upload bandwidth summation for the contenttransmission provided by all nodes of the content source”;

B2. If (MU₁+ . . . +MU_(N))* U_(bass)+L*D≧f (N*D), properly increasingthe transmission rate D when it is possible and required; properlydecreasing L when it is possible and required;

C2. If (MU₁+ . . . +MU_(N))* U_(bass)+L*D≦f (N*D), and (MU₁+ . . .+MU_(N))* U_(bass)+the summation of maximum upload bandwidth fortransmitting the content provided by all nodes for the content source≧f(N*D), and maintaining the original transmission rate is required, thenproperly increasing the number L of the content stream transmitted fromthe source end;

D2. If (MU₁+ . . . +MU_(N))* U_(bass)+the summation of maximum uploadbandwidth for transmitting the content provided by all nodes for thecontent source≦f (N*D), and D can be decreased, then properly decreasingD.

When (MU₁+ . . . +MU_(N))* U_(bass)+L*D≦f (N*D) and transmission rate isfixed and cannot be changed, it includes one or more of the followingstep(s):

a. When data dropping is permitted, then discarding the content failedto be transmitted in time;

FIELD OF THE INVENTION

b. During multi-bit encoding content transmission, if there are contentsat lower rate to be transmitted, then selecting them to access;

c. Dealing with it according to transmission failure.

For achieving the objectives mentioned above, this invention alsodiscloses a device for controlling content to stream on P2P network,comprising a content block generating module, for dividing the contentto be transmitted into a plurality of blocks; a detection module, forsupervising and controlling the connection state of the nodestransmitting the content; transmission parameter calculating module, forcalculating each node's upload rate coefficient MU_(j), the selectedupload rate coefficient U_(j), transmission rate D of the content streamand transmitted content stream number L of the content source, in which,j=1,2, . . . N, N indicates the number of nodes transmitting thecontent, the said upload rate coefficient MU_(j) equals to the maximumupload rate permitted for content transmission divided by the base rateU_(bass), the said selected upload rate coefficient U_(j) simultaneouslysatisfies the following two formulas:(U ₁ + . . . +U _(N))*U _(bass) +L*D≧f(N*D)U_(j)≦MU_(j)

In the formulas above, f (N*D) is the function relating to N*D, and isthe bandwidth required for total download; and

D≦maximum transmission rate of content stream used by content sourcewhen transmitting one content stream;

L*D≦summation of the maximum upload bandwidth for the contenttransmission provided by all nodes of the content source;

The content block distribution module is used for distributing thecontent blocks able to be transmitted by each node proportionallyaccording to the selected upload rate coefficient; the transmissionmodule is used for transmitting the distributed the content blocks ofeach node to the corresponding nodes; the node transmission controlmodule is used for retransmitting the received content blocks to theother nodes.

The said transmission parameter calculating module consists of theupload rate coefficient calculating unit and the selected upload ratecoefficient calculating unit; the said upload rate coefficientcalculating unit receives the maximum upload rate of each node permittedfor content transmission which is detected by detection module, andcalculates the upload rate coefficient of each node; the said uploadrate coefficient is the ratio of the upload rate coefficient to the baserate; the said selected said upload rate coefficient calculating unitdistributes one selected upload rate coefficient according to the uploadrate coefficient calculated by the upload rate coefficient calculatingunit.

Further, the said transmission parameter calculating module is composedof a unit for calculating transmission rate D of content stream and aunit for calculating the number L of content stream from the contentsource.

It also consists of a Quality of Service module. The Quality of Servicemodule is used for reporting the detected problem during transmission tothe detection module.

For achieving the objectives mentioned above, this invention alsodiscloses a computer readable medium with computer executable program.The program embedded on the said medium can accomplish the followingfunctions:

Dividing the content to be transmitted into different blocks; Detectingthe connection state of all nodes transmitting the content, includingthe maximum upload rate permitted for content transmission of each node,in which calculating upload rate coefficient MU_(j) of each node: thesaid upload rate coefficient MU_(j) equals to the maximum upload ratepermitted for content transmission divided by the base rate U_(bass),the selected upload rate coefficient U_(j) of each node is determinedbased on upload rate coefficient MU_(j), herein, j=1,2, . . . N, Nindicates the number of nodes transmitting the content and determiningtransmission rate D of the content stream and the number L transmittedcontent stream from the content source, the said transmission rate D ofthe content stream and the number L of the content stream transmittedfrom the content source can be variable or fixed depending on differentconditions, the said selected upload rate coefficient U_(j)simultaneously satisfies the following two formulas:(U ₁ + . . . +U _(N))*U _(bass) +L*D≧f(N*D)U_(j)≦MU_(j)

In the formulas above, f (N*D) is the function relating to N*D, and isthe bandwidth required for total download; and

D≦maximum transmission rate of content stream used by content sourcewhen transmitting one content stream;

L*D≦summation of maximum upload bandwidth for the content transmissionprovided by all nodes of the content source;

The content source uploads the content at the rate of L*D;

The content source distributes the content blocks being able to betransmitted by each node proportionally according to the selected uploadrate coefficient of each node;

Respectively transmitting the distributed content blocks to thecorresponding nodes, and controlling the nodes to retransmit thereceived blocks to the other nodes.

For achieving the objectives mentioned above, this invention alsodiscloses an executable program used for server computer. The saidprogram can complete the followings though the computer:

Dividing the content to be transmitted into different blocks;

Detecting the connection state of all the nodes transmitting thecontent, including the maximum upload rate permitted for contenttransmission of each node, calculate upload rate coefficient MU_(j) ofeach node, the said upload rate coefficient MU_(j) equals to the maximumupload rate permitted for content transmission divided by the base rateU_(bass), the selected upload rate coefficient U_(j) of each node isdetermined based on upload rate coefficient MU_(j), in which, j=1,2, . .. N, N indicates the number of nodes transmitting the content anddetermines transmission rate D of the content stream and transmittedcontent stream number L of the content source, the said transmissionrate D of the content stream and transmitted content stream number L ofthe content source can be variable or fixed depending on differentconditions, the said selected upload rate coefficient U_(j)simultaneously satisfies the following two formulas:(U ₁ + . . . +U _(N))*U _(bass) +L*D≧f(N*D)U_(j)≦MU_(j)

In the formulas above, f (N*D) is the function relating to N*D, which isthe bandwidth required for total download; and

D≦maximum transmission rate of content stream used by content sourcewhen transmitting one content stream;

L*D≦summation of maximum upload bandwidth for the content transmissionprovided by all the nodes of content source;

The content source uploads the content at the L*D rate;

The content source distributes the content blocks being able to betransmitted by each node proportionally according to the selected uploadrate coefficient of each node;

The distributed content blocks are respectively transmitted to thecorresponding nodes, and the nodes are controlled to retransmit thereceived content blocks to the other nodes.

Beneficial effects of the invention: 1) By taking use of the selectedupload rate coefficient, this invention makes the number of contentblocks distributed to the nodes which are able to be transmitted isproportional to the selected upload rate coefficient. The selectedupload rate coefficient is determined based on the comprehensivecondition of the network, so that it enables the members can provide theupload bandwidth for satisfying single member's download as possible.Only in case of insufficient capability of some members, it isundertaken cooperatively by the members with excessive upload bandwidthand the content source. In this way, the sources of each node can bemore reasonably and fully used and P2P network content transmission rateand traffic can be enhanced. 2) Transmission rate D of the contentstream and the number L of content stream transmitted from the contentsource can be regulated according to particular situation, in this way,it can not only reasonably and fully take use of P2P resource totransmit the content, but also maintain the content transmission throughthe said regulation in case of network changing.

The features and advantages of the invention are illustrated in moredetail by reference to the following embodiments and accompanyingfigures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a structured block diagram of an embodiment of the invention;

FIG. 2 is a flow chart of an embodiment of the invention;

FIG. 3 is a flow chart of setting transmission parameter of anembodiment of the invention;

FIG. 4 is a structured block diagram of another embodiment of theinvention;

FIG. 5 is a structured block diagram of a server divided into two partsaccording to the invention;

DETAIL DESCRIPTION OF THE INVENTION

The principle of this invention is as following:

Supposing that in a certain period a rate of one content streamtransmitted from a content source is D, and a rate for a node receivingthe content block from either the source or other nodes, i.e. thedownload rate, should be equal to D.

Users can add the content transmission at different rates according totheir network connecting capability, supposing that the networkconnection of the node asking for content transmission service shouldsatisfy the requirements for download of this steaming media. Then, asfor transmission of content to a group (group means a group of members),the download rate of each member of the group should be the same at D.If D is variable, D can not be larger than the lowest rate of eachmember of the group, in which maximum D is represented by D_(max).

The basic conditions satisfying P2P transmission are:

Summation of upload rate provided by each member (receiving thecontent)+summation of upload bandwidth for content transmission providedby all the nodes of the content source≧bandwidth required for totaldownload.

Herein, the upload bandwidth provided by the content source (either anode or a group of nodes) is supposed to be L*D, meaning that thecontent source can provide the number L of content stream at D rate.

The content stream means the transmitted content data at a rate (e.g.D).

According to the basic conditions for P2P transmission, the solution forP2P transmission becomes: seeking suitable L and D, and respectivelyappointing the member (receiving the content) to provide upload serviceat a suitable rate for the member.

During the transmission in which the content is divided into blocks,node upload service embodies in the transmission of the content blocks.

Appointing the member to provide upload service at a suitable rate ofthe member is accomplished through distributing a different number ofcontent blocks to the different members for transmission.

In particular, for the group receiving the content, the base rate isrepresented by U_(bass). Generally, U_(bass) is the rate of transmittinga content package (wherein it is a full package, which is the packagedcontent block at maximum length) within a certain period (e.g. thelength of the content package is 800 bytes, the time is 1 second, thenU_(bass)=800 byte/second). calculate the multiple with U_(bass) for themaximum upload rate able to used for content transmission of the usersin this group, the maximum upload rate (This rate is not definitely themaximum upload rate of the node) able to be used for contenttransmission, calculate out that the upload rate coefficient for thenode with user code of j:

MU_(j)=maximum upload rate of j used for content transmission/U_(bass)

U_(j) is the selected upload rate coefficient for user j in thisinvention, and it can be a value ranging 0 (included) to MU_(j). If useris required to retransmit the content block, during a certain period,the system distributes content block proportionally to j according toU_(j).

Supposing that the content is transmitted to N nodes, the contenttransmission must satisfy the following conditions:(U ₁ + . . . +U _(N))*U _(bass) +L*D≧f(N*D)

Herein, U_(j)≦MU_(j); D≦D_(max); L*D≦summation of the maximum uploadbandwidth for content transmission provided by all the nodes of thecontent source; f (N*D) is the function relating to N*D, which is thebandwidth required for total download.

U_(j), L and D are respectively variable or fixed.

By changing one or more parameter(s) of U_(j), L and D, the contenttransmission in various conditions can be realized.

Herein, (U₁+ . . . +U_(N))* U_(bass) indicates the summation of uploadrate provided by each member (receiving the content). The appointedupload rate of node j is U_(j) * U_(bass). It should be noted that theremay be various methods to distribute content blocks to nodes foruploading. It is preferred that content blocks are distributed accordingto U_(j). However, all the methods should make the nodes provideuploading service at the appointed rate.

Furthermore, the principle of selecting U_(j) is: to enable the membersto provide the upload bandwidth for satisfying single member's downloadas possible. It means to conform to the following principle: selectU_(j)=MU_(j) when MU_(j)*U_(bass)≦D; if U_(j)*U_(bass)≧D, select U_(j)when MU_(j)*U_(bass)>D. Only in case of insufficient capability of somemembers, it is undertaken cooperatively by the members with excessiveupload bandwidth and the content source.

Embodiment 1: FIG. 1 shows a structured block diagram of a serveraccording to one embodiment of this invention. Detection module 2supervises and controls the changes of user accessing, exiting or user'snetwork connection state. Transmission coefficient calculating module 1calculates the transmission parameters based on the data detected bydetection module 2. The transmission parameters include upload ratecoefficient MU_(j), selected upload rate coefficient U_(j), transmissionrate D of content stream and the number L of the content streamtransmitted from the content source. Accordingly, transmissioncoefficient calculating module 1 further includes unit 11 forcalculating upload rate coefficient, unit 12 for calculating selectedupload rate coefficient, unit 13 for calculating transmission rate D ofthe content stream and unit 14 for calculating the number of contentstream transmitted from the content source. According to the maximumupload rate used for content transmission on the node j detected bydetection module 2 and the base rate U_(bass), unit 11 for calculatingupload rate coefficient calculates the upload rate coefficient MU_(j).In addition, based on the result detected from the detection module 2,unit 13 for calculating transmission rate of the content stream and unit14 for calculating the number of content stream transmitted from thecontent source determine transmission rate D of content stream and thenumber L of content stream transmitted from the content source. Thetransmission rate D of content stream and number L of content streamtransmitted from the content source can be variable or fixed dependingon different transmission conditions, the calculation includes thefollowing steps: firstly determining the range of the said transmissionrate D of the content stream and the number L of content streamtransmitted from the content source (the range of D if L is fixed, orthe range of L if D is fixed) by using the condition that “D≦Dmax” and“L*D≦summation of maximum upload bandwidth for the content transmissionprovided by all the nodes for the content source”; adjusting the saidthe said transmission rate D of the content stream and the number L ofcontent stream transmitted from the content source depending ondifferent transmission conditions, that is to say, if (MU₁+ . . .+MU_(N))* U_(bass)+L*D≧f (N*D) and increasing transmission rate D isrequired, then properly increasing the transmission rate D; if (MU₁+ . .. +MU_(N))* U_(bass)+L*D≦f (N*D) and (MU₁+ . . . +MU_(N))*U_(bass)+summation of maximum is upload bandwidth for contenttransmission provided by all the nodes for the content source≧f (N*D),and original transmission rate should be kept, then properly increasingthe number L of the content stream transmitted from the source end.Content block generating module 3 divides the content to be transmittedinto blocks and marks each content block; According to the transmissioncoefficient outputted from transmission coefficient calculating module1, content block distributing module 4 distributes proportionally thecontent blocks divided by content block generating module 3 or thecontent blocks received by content block receiving module 4 to each nodefor transmission. The distribution method is that the number of thecontent blocks distributed to each node for transmission is proportionalto the selected upload rate coefficient U_(j). Transmission module 6respectively transmits the content blocks distributed to each node fortransmission by content block distributing module 4 to the correspondingnodes.

As shown in FIG. 2, it is a flow chart of one embodiment of thisinvention, consisting of the following steps:

In step 101, the detection module monitors and controls the change ofaccess, exit and network connection state of each node regularly. Onceit occurs to a new user accessing or user exiting, the detection modulewill detect the network connection parameters. If there are changes ofthe network connection state, the detection module will also detect thenetwork connection parameters, which are used in the following steps,and then performing step 102;

In step 102, according to the network connection state of each node,calculating the upload rate coefficient MU_(j) (j=1, 2, N, N indicatesthe number of all nodes participating in the content transmission),transmission rate D of the content stream and the number L of thecontent stream transmitted from the content source. The upload ratecoefficient is the ratio of the maximum upload rate of node for contenttransmission to the base rate U_(bass). Calculating the multiple ofmaximum upload rate of node for content transmission with U_(bass), andthen obtaining upload rate coefficient of node j:

MU_(j)=maximum upload rate of node j for content transmission/U_(bass)

Then performing step 103;

In step 103, distributing the selected upload rate coefficient for thisnode based on the upload rate coefficient, and then performing step 105;

In step 105, generating transmission policy based on the selected uploadrate coefficient, transmission rate D of the content stream and thenumber L of the content stream transmitted from the content source, andthen performing step 107;

In step 107, distributing the content block proportionally generated bystep 106 to each node according to the selected upload rate coefficient,the content block number distributed to each node for transmission isproportional to the selected upload rate coefficient of each node givenby the server. And then performing step 108;

In step 108, the content source respectively transmits the content blockdistributed to each node at the rate of L*D to the corresponding nodes,transmission technology can be P2P transmission, and then step 109 isperformed;

In step 109, the node controlling the content block received retransmitsto other nodes, in which the transmission technology can be P2Ptransmission.

The content source can be one or more node(s). During transmission, thetransmission rate D of the content stream and the number L of contentstream transmitted from the content source can be variable or fixedaccording to particular transmission condition. The regulation flow isshown as FIG. 3 including the following steps:

In step 201, In case of changes of transmission state, judging if (nodeupload bandwidth capacity+L*D) is smaller than or equal to the capacityrequired for download, i.e. judging if (MU₁+ . . . +MU_(N))*U_(bass)+L*D≦f (N*D). If yes, performing step 202; if not, thenperforming step 204;

In step 202, judging if it is possible to increase the number L ofcontent stream transmitted from the content source and to decrease thetransmission rate D of the content stream simultaneously and if this isrequired. If yes, performing step 203; if not, performing step 209;

In step 203, increasing the number L of content stream transmitted fromthe content source and decreasing the transmission rate D of the contentstream, and then performing step 208;

In step 204, when it is possible to increase the transmission rate D ofthe content stream and this is required, performing step 206; if thetransmission rate D of the content stream can not be increased,performing step 207 for decreasing the number L of content streamtransmitted from the content source, and then performing step 208;

In step 208, reasonably arranging the bandwidth of each node foruploading;

In step 209, judging if it is possible to increase the content streamnumber L of the content source and this is required. If yes, performingstep 210, and if not, performing step 211;

In step 210, increasing the number L of content stream transmitted fromthe content source, and then performing step 208;

In step 211, judging if it is possible to decrease the transmission rateD of the content stream and this is required. If yes, performing step212 and decreasing the transmission rate D of the content stream, andthen perform step 208; if not, performing step 213 for correspondingtreatment meaning the followings:

When (MU₁+ . . . +MU_(N))* U_(bass)+L*D≦f (N*D) and the transmissionrate is fixed, it consists of one or more step(s) of the followings:

a. When data dropping is permitted, then discarding the content failedto be transmitted in time;

b. During multi-bit encoding content transmission, if there are contentsat lower rate to be transmitted, then selecting them to access;

c. Dealing with it according to transmission failure.

To increase/decrease L is to increase/decrease the upload bandwidth ofthe server, in which the bandwidth of server is a rare resource. Whenuser has sufficient upload capacity, it is preferred to decrease L aspossible. This is one of the objectives of P2P (using the capacity ofnode as possible to reduce the function of server). To increase/decreaseD is to increase/decrease content transmission rate. If conditions arepermitted, the faster the rate is, the better it is for users.

The embodiment 2: as shown in FIG. 4, based on embodiment 1, a Qualityof Service module is also included. If the Quality of Service moduledetects problems during transmission, it will report them to thedetection module 2. The detection module 2 needs to check the connectionstate of each node for calculating the transmission parameters again.

As shown in FIG. 5, it is a structured block diagram of the server sideaccording to one embodiment of this invention. At the server side, itcan be divided into an area of user management server and an area ofcontent server according to different functions. The area of usermanagement server includes detection module 2, transmission parametercalculating module 1 and calculated result notifying module 8. The areaof content server consists of control parameter receiving module 9,transmission policy generating module 10, content block distributingmodule 4, content block generating module 3, receiving module 5,transmission module 6 and detection module 2.

The following is another embodiment of this invention. A server dividesthe login nodes into one or more group(s) establishes a control data setfor each group. Relying on the control data set, the server calculatesupload rate coefficients for all the members in this group, depending onwhich the server distributes and transmits the contents. For particularrealization, the following method can be applied:

When (MU₁+ . . . +MU_(N))* U_(bass)+L*D≧f (N*D), meaning that each nodehas excessive upload bandwidth and keeps the original transmission rate,then adopting the following implementation:

For better explanation, it is simplified to take transmitting onecontent block as unit of the rate. Supposing that there are N members inthe group, within certain time t, N members require to totally downloadthe number M of content blocks. In the same way, the upload rate is thatU_(bass) member uploads one content block within the time t.

Select SU_(j)=MU_(j) if MU_(j)*U_(bass)≦D, select SU_(j)=D/U_(bass) ifMU_(j)*U_(bass)< D. SU_(j) represent the bandwidth coefficient forsatisfying its downloading as possible.

Firstly, each member has transmitted the number SU_(j) of contentblocks, then the number of residual blocks to be transmitted isindicated as M′.

Then, more content blocks are distributed to the members with excessiveupload capacity:

U_(j)′=(MU_(j)−SU_(j))/summation of the residual upload ratecoefficients of all the members *M′U _(j) =U _(j) ′+SU _(j)

In this way, U_(j)(j=1, 3, . . . , N) are obtained. Within time t, thenode j requires to upload the number U_(j) of content blocks.

Another simplified effective method is:

Adding up the number M₁ of members which the upload rate coefficient is1, and the number M₂ of members which the upload rate coefficient is 2,and so on. When distributing, distributing one content block to eachmember which is able to upload (MU_(j)≧1) first. If the distributedblocks are insufficient, one more content block is distributed to themember (MU_(j)≧2) with excessive capability. If the distributed blocksare still insufficient, one more content block is distributed further tothe member (MU_(j)≧3) with excessive capability, and so on.

From M₁, M₂, . . . Mk can be calculated, that is to say the minimum kcan be found. It makes(M ₁ +M ₂ + . . . M _(k))≧M

After worked out k, the node j requires to upload the content blockswhich number is the smaller in MU_(j) and k.

In this way, for the nodes with upload capacity, they can upload thecontent blocks according to their upload capacity without extra help ofother nodes, accordingly, this reduces the excessive load on the othernodes and more reasonably uses the network bandwidth.

The modules or flows mentioned above can be programmed. This program canbe embedded on a computer, including a server computer.

The program designed according to the modules or flows mentioned abovecan be stored in the external readable storage medium. The storagemedium can be floppy disk, CD-ROM, hard disk, tape recoding medium,semiconductor IC card or other optical recording mediums (e.g. DVD orPD), or magnetic recording medium. The server system providing networkconnection can also be used as the readable medium for recording thesaid program.

1. A method for realizing content flowing continuously on P2P networkcomprising the following steps: A1.dividing a content to be transmittedinto different blocks; B1.detecting connection states of all nodestransmitting the content, including a maximum upload rate permitted forthe content transmission of each node, in which an upload ratecoefficient MU_(j) of each node is calculated, the upload ratecoefficient MU_(j) equals to the maximum upload rate permitted forcontent transmission divided by a base rate U_(bass), the selectedupload rate coefficient U_(j) of each node is determined based on theupload rate coefficient MU_(j), wherein, j=1,2,....N, N indicates thenumber of nodes transmitting the content, a transmission rate D ofcontent streams and transmitted content stream number L of the contentsource are determined, the transmission rate D of the content stream andtransmitted content stream number L of the content source can bevariable or fixed depending on different conditions, the selected uploadrate coefficient U_(j) simultaneously satisfies the following twoformulas:(U ₁ + . . . +U _(N))*U _(bass) +L*D≧f(N*D)U_(j)≦MU_(j) in the formulas above, f (N*D) is a function relating toN*D, which is a bandwidth required for total download; and D≦maximumtransmission rate of content stream used by content source whentransmitting one content stream; L*D≦summation of maximum uploadbandwidth for a content transmission provided by all nodes of contentsources; C1. the content source distributes the content blocks beingable to be transmitted by each node proportionally according to theselected upload rate coefficient of each node; D1. the content sourcerespectively transmits the distributed content blocks to thecorresponding nodes at L*D rate, and controls the nodes to retransmitthe content blocks received to the other nodes.
 2. The method forrealizing content flowing continuously on P2P network according to claim1, wherein in the step C1 and D1, the nodes transmit the content blocksaccording to the selected upload rate coefficient.
 3. The method forrealizing content flowing continuously on P2P network according to claim1, wherein in the step B1, the selected upload rate coefficient U_(j) ofeach node is determined based on the following conditions: selectU_(j)=MU_(j) when MU_(j)*U_(bass)≦D; when MU_(j)*U_(bass)>D, theselected U_(j) should satisfy U_(j)*U_(bass)≧D.
 4. The method forrealizing content flowing continuously on P2P network according to claim3, wherein when (MU₁+ . . . +MU_(N))* U_(bass)+L*D≧f (N*D), an originaltransmission rate and a network upload bandwidth of the content sourceare maintained, the said step D1 includes the following steps: D11.controlling nodes which selected upload rate coefficient is larger thanor equal to 1 and with the capability of uploading the content blocks todistribute one block; D12. calculating a residual selected upload ratecoefficient of each node: the residual selected upload rate coefficientequals to the distributed content block number of this node subtractedfrom the selected upload rate coefficient; D13. if there are residualcontent blocks to be uploaded, performing step D14; D14. controlling thenodes which residual selected upload rate coefficient is larger than orequal to 1 and with the residual upload capability block to distributeone block; D15. repeating to perform step D12-D14 until all the contentblocks are distributed.
 5. The method for realizing content flowingcontinuously on P2P network according to claim 3, wherein when (MU₁+ . .. +MU_(N))* U_(bass)+L*D≧f (N*D) and the original transmission rate andthe network upload bandwidth of a content source are maintained, thestep D1 includes the following steps: D11′. calculating the bandwidthcoefficient SU_(j) which is satisfied the requirement for itsdownloading as possible: SU_(j)=MU_(j) when MU_(j)*U_(bass)≦D,SU_(j)=D/U_(bass) when MU_(j)*U_(bass)>D; D12′. calculating U_(j)′according to the formula U_(j)′=(MU_(j)−SU_(j))/sum of residual uploadrate coefficient for all the members * the number of residual blocks tobe uploaded; D13′. calculating U_(j)′ according to the formulaU_(j)′=U_(j)′+SU_(j); D14′. member j (j=1, 2, . . . , N) distributes thecontent blocks with U_(j).
 6. The method for realizing content flowingcontinuously on P2P network according to claim 1, wherein in the stepB1, regularly detecting the connection state of each node, calculatingthe selected upload rate coefficient U_(j), transmission rate D of thecontent stream and the number L of content stream transmitted from thecontent source.
 7. The method for realizing content flowing continuouslyon P2P network according to claim 6, wherein the step B1 consists of thefollowing steps: use Quality of Service, when problem is detected duringtransmission, it inspects the connection state of each node, calculatesthe selected upload rate coefficient U_(j), transmission rate D of thecontent stream and the number L of content stream transmitted from thecontent source for each node.
 8. The method for realizing contentflowing continuously on P2P network according to claim 7, wherein thetransmission rate D of the content stream and the number L of contentstream transmitted from the content source can be variable or fixeddepending on different conditions, the calculation of the saidtransmission rate D of the content stream and the number L of contentstream transmitted from the content source includes the following steps:A2. calculating the range of the said transmission rate D of the contentstream and the number L of content stream transmitted from the contentsource by using the condition that D≦transmission rate of maximumcontent stream used by the content source when transmitting one contentstream and L*D≦summation of maximum upload bandwidth for the contenttransmission provided by all nodes of the content source; B2. on thecondition of (MU₁+ . . . +MU_(N)) * U_(bass)+L*D≧f (N*D), then properlyincreasing the transmission rate D if it is possible and required;properly decreasing L if possible and required; C2. if (MU₁+ . . .+MU_(N))* U_(bass)+L*D≦f (N*D), and (MU₁+ . . . +MU_(N))* U_(bass)+thesummation of maximum upload bandwidth for transmitting the contentprovided by all nodes for the content source≧f (N*D), and maintainingthe original transmission rate is required, then properly increasing thenumber L of the content stream transmitted from the source end; D2. if(MU₁+ . . . +MU_(N))* U_(bass)+the summation of maximum upload bandwidthfor transmitting the content provided by all nodes for the contentsource≦f (N*D), and D can be decreased, then properly decreasing D. 9.The method for realizing content flowing continuously on P2P networkaccording to claim 7, wherein when (MU₁+ . . . +MU_(N))* U_(bass)+L*D≦f(N*D) and transmission rate is a fixed, it includes one or more of thefollowing step(s): a. if data dropping is permitted, then discarding thecontent failed to be transmitted in time; b. during multi-bit encodingcontent transmission, if there are contents at lower rate to betransmitted, then selecting them to access; c. dealing with it accordingto transmission failure.
 10. The method for realizing content flowingcontinuously on P2P network according to claim 7, wherein the saidcontent source is one or more node(s).
 11. A device for controllingcontents to stream on P2P network comprising: a content block generatingmodule, used for dividing a content to be transmitted into a pluralityof blocks; a detection module, used for supervising and controllingconnection state of nodes transmitting the content; a transmissionparameter calculating module, used for calculating each node's uploadrate coefficient MU_(j), a selected upload rate coefficient U_(j), atransmission rate D of the content stream and the number L of contentstream transmitted from a content source, wherein, j=1,2, . . . N, Nindicates the number of nodes transmitting the content, the said uploadrate coefficient MU_(j) equals to the maximum upload rate permitted forcontent transmission divided by the base rate U_(bass), the saidselected upload rate coefficient U_(j) simultaneously satisfies thefollowing tow formulas:(U ₁ + . . . +U _(N))*U _(bass) +L*D≧f(N*D)U_(j)≦MU_(j) wherein, f (N*D) is the function relating to N*D, and isthe bandwidth required for total download; and D≦maximum transmissionrate of content stream used by content source when transmitting onecontent stream; L*D≦summation of the maximum upload bandwidth for thecontent transmission provided by all nodes of the content source; acontent block distribution module, used for distributing the contentblocks able to be transmitted by each node proportionally according tothe selected upload rate coefficient; a transmission module, used fortransmitting the distributed the content blocks of each node to thecorresponding nodes; a node transmission control module, used forcontrolling the nodes received content blocks to retransmit them to theother nodes.
 12. The device for controlling content to stream on P2Pnetwork according to claim 11, wherein the said transmission parametercalculating module consists of the upload rate coefficient calculatingunit and the selected upload rate coefficient calculating unit; the saidupload rate coefficient calculating unit receives the maximum uploadrate of each node permitted for content transmission which is detectedby detection module, and calculates the upload rate coefficient of eachnode; the said upload rate coefficient is the ratio of the upload ratecoefficient to the base rate; the said selected upload rate coefficientcalculating unit distributes one selected upload rate coefficientaccording to the upload rate coefficient calculated by the upload ratecoefficient calculating unit.
 13. The device for realizing contentflowing continuously on P2P network according to claim 12, wherein thesaid transmission parameter calculating module is composed of an unitfor calculating transmission rate D of the content stream and an unitfor calculating the number L of the content stream from the contentsource.
 14. The device for realizing content flowing continuously on P2Pnetwork according to claim 13, wherein it also consists of the Qualityof Service module. The said Quality of Service module is used forreporting the detected problem during transmission to the detectionmodule.
 15. A computer non-transitory readable medium with a computerexecutable program, the program embedded on the said medium is executedby the computer to accomplish the method according to claim
 1. 16. Anexecutable program used for non-transitory readable medium used forserver computer, the program is executed by the computer to accomplishthe method according to claim 1.